﻿using System.Text.Json.Serialization;

namespace Sirius.Entity
{

    //子频道对象
    public class Channel
    {
        //子频道id
        [JsonPropertyName("id")]
        public string ID { get; set; }

        //频道id
        [JsonPropertyName("guild_id")]
        public string guild_Id { get; set; }

        //子频道名
        [JsonPropertyName("name")]
        public string Name { get; set; }

        //子频道类型
        [JsonPropertyName("type")]
        public int Type { get; set; }

        //子频道子类型
        [JsonPropertyName("sub_type")]
        public int SubType { get; set; }

        //排序值，具体查看
        //https://bot.q.qq.com/wiki/develop/api/openapi/channel/model.html
        [JsonPropertyName("position")]
        public int Position { get; set; }

        //所属分组 id，仅对子频道有效
        [JsonPropertyName("parent_id")]
        public string parent_Id { get; set; }

        //频道创建人Id
        [JsonPropertyName("owner_id")]
        public string owner_Id { get; set; }

        //子频道私密类型
        [JsonPropertyName("speak_permission")]
        public int speak_permission { get; set; }

        //用于标识应用子频道应用类型，
        //仅应用子频道时会使用该字段，
        //具体参考https://bot.q.qq.com/wiki/develop/api/openapi/channel/model.html
        [JsonPropertyName("application_id")]
        public string application_Id { get; set; }

        //用户拥有的子频道权限
        [JsonPropertyName("permissions")]
        public string Permissions { get; set; }
    }
    //子频道类型
    public enum ChannelType
    {
        //文字子频道
        TextChannel = 0,
        
        //1，保留，不可用

        //语音子频道
        VoiceChannel = 2,

        //3，保留，不可用

        //子频道分组
        GroupChannel = 4,

        //直播子频道
        LiveChannel = 10005,

        //应用子频道
        AppChannel = 10006,

        //论坛子频道
        bbsChannel = 10007
    }

    //子频道子类型
    public enum ChannelSubType
    {
        //闲聊
        Text = 0,

        //公共
        Notice = 1,

        //攻略
        script = 2,

        //开黑
        openBlack = 3
    }

    //子频道私密类型
    public enum PrivateType
    {
        //公开频道
        OpenChannel =0,
        
        //群主管理员可见
        AdminChannel = 1,

        //群主管理员+指定成员
        AdminAndUser = 2,
    }

    //子频道发言权限
    public enum SpeakPermission
    {
        //无效类型
        inv = 0,

        //所有人
        all = 1,

        //群主管理员+指定成员
        adminAndUser = 2
    }

    //应用子频道应用类型
    public enum Application_Id
    {
        //王者开黑大厅
        KingOpenBlack = 1000000,

        //互动小游戏
        Game = 1000001,

        //腾讯投票
        Vote = 1000010,

        //飞车开黑大厅
        FlyCarOpenBlack = 1000051,

        //日程提醒
        Schedule = 1000050,

        //使命召唤开黑大厅
        CodmOpenBlack = 1000070,

        //和平精英开黑大厅
        PepachOpenBlack = 1010000
    }

}